import 'package:xinxuan/vo/common_vo/common_pagination_vo.dart';

class StoreListVo {

  List<StoreItem>? data;
  StoreMeta? meta;

  StoreListVo({this.data, this.meta});

  StoreListVo.fromJson(Map<String, dynamic> json) {
    if (json['data'] != null) {
      data = <StoreItem>[];
      json['data'].forEach((v) {
        data!.add(new StoreItem.fromJson(v));
      });
    }
    meta = json['meta'] != null ? new StoreMeta.fromJson(json['meta']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.data != null) {
      data['data'] = this.data!.map((v) => v.toJson()).toList();
    }
    if (this.meta != null) {
      data['meta'] = this.meta!.toJson();
    }
    return data;
  }
}

class StoreItem {
  int? id;
  String? address;
  String? title;

  StoreItem({this.id, this.address, this.title});

  StoreItem.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    address = json['address'];
    title = json['title'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['address'] = this.address;
    data['title'] = this.title;
    return data;
  }
}

class StoreMeta {
  CommonPagination? pagination;

  StoreMeta({this.pagination});

  StoreMeta.fromJson(Map<String, dynamic> json) {
    pagination = json['pagination'] != null
        ? new CommonPagination.fromJson(json['pagination'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.pagination != null) {
      data['pagination'] = this.pagination!.toJson();
    }
    return data;
  }
}